<?php

/**
    URL 地址分发尝试
    apache rewrite配置:
    RewriteEngine on
    RewriteCond ??real path??/htdocs/%{REQUEST_FILENAME} !-f
    RewriteCond ??real path??/htdocs/%{REQUEST_FILENAME} !-d
    RewriteCond ??real path??/htdocs/%{REQUEST_FILENAME}/index.php !-f
    RewriteRule ^(.*)$ /routing.php
*/

require_once 'global.php';

$router = new Routing_Router();
$router->setProgramBasePath(HTDOCS_PATH);
$router->setNotFoundProgram('common' .DS. '404.php');

$router->loadRules(include(dirname(__FILE__) .DS. 'routing_rules.php'));

if ($router->doRoute() === false)
{
    $router->notFound();
}

exit;

?>